
package com.plian.system.service.fr.report.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.plian.system.entity.fr.report.ReportAuthorizeRelation;
import com.plian.system.mapper.fr.report.ReportAuthorizeRelationMapper;
import com.plian.system.service.fr.report.IReportAuthorizeRelationService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @description: 预算表和审定表 取数关系表
 * @author: gangan
 * @create: 2022-01-07 15:35
 */
@Service
@AllArgsConstructor
public class ReportAuthorizeRelationServiceImpl extends ServiceImpl<ReportAuthorizeRelationMapper, ReportAuthorizeRelation> implements IReportAuthorizeRelationService {
    /**
     * logger属性.
     */
    private static final Logger LOGGER  = LoggerFactory.getLogger(ReportAuthorizeRelationServiceImpl.class);


    @Override
    public ReportAuthorizeRelation getAuthorize(String reportTableName, String reportColumns, String reportLines, String version) {
        return getOne(new LambdaQueryWrapper<ReportAuthorizeRelation>().eq(ReportAuthorizeRelation::getReportTableName, reportTableName)
                .eq(ReportAuthorizeRelation::getReportColumnId, reportColumns).eq(ReportAuthorizeRelation::getReportLines, reportLines).eq(ReportAuthorizeRelation::getVersion, version));
    }
}
